package initialize

import (
	"fmt"
	"github.com/spf13/viper"
	"onerk4/zg5yk/ordering/common/global"
)

func ConfigInit() {
	viper.SetConfigFile("../common/config/dev.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		return
	}
	err = viper.Unmarshal(&global.AppConfig)
	if err != nil {
		return
	}
	fmt.Printf("配置文件设置成功:%v\n", global.AppConfig.NacosConfig)
}
